package com.sx.wechat.command.api;

import com.sx.core.vo.JsonReaderResponse;
import com.sx.wechat.command.cmd.AbstractCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 挂失解挂
 * Created by lihao on 2018/3/21.
 */
@Component("list_class")
public class List_class extends AbstractCommand {
    @Autowired
    JdbcTemplate jdbcTemplate;
    @Override
    public Object executeApi(HttpServletRequest request, HttpServletResponse response) {
        String sql="select * from t_class";
        return new JsonReaderResponse(jdbcTemplate.queryForList(sql));
    }
}
